add_library(timer-objs
        OBJECT
        TimerInternal.hpp
        Random.hpp
        Random.cpp
        NetContext.hpp
        NetContext.cpp
        Timer.hpp
        )

list(APPEND flags "-fPIC" "-Wall")
if(NOT WIN32)
    list(APPEND flags "-Wextra" "-Wpedantic")
endif()

target_compile_options(timer-objs
        PRIVATE
        ${flags}
        )

add_library(timer-static
        STATIC
        $<TARGET_OBJECTS:timer-objs>
        )

add_library(timer-shared
        SHARED
        $<TARGET_OBJECTS:timer-objs>
        )



target_link_libraries(timer-shared
        PUBLIC
        pthread
)
